package giab.weixin.web.httpimpl;

import java.util.ArrayList;

import giab.weixin.web.httpservice.HttpBaseService;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class DriverHttpImpl {
	@Autowired
	private HttpBaseService hbs;
	
	/**
	* @author 张怡菲
	* @createTime 	2013-5-7 下午4:25:59
	* @Title: driverConfirmOrders
	* @Description:   查询所有已确认的订单信息接口
	* @param weixinId
	* @param pageNumber
	* @param pageCount
	* @param totalCount
	* @return    String
	* @modifyTime	2013-5-7 下午4:25:59
	* 
	*/
	
	public String driverConfirmOrders(String weixinId,String pageNumber,String pageCount,String totalCount){
		ArrayList<NameValuePair> param = new ArrayList<NameValuePair>();
		param.add(new BasicNameValuePair("weixinId", weixinId));
		param.add(new BasicNameValuePair("pageNumber", pageNumber));
		param.add(new BasicNameValuePair("pageCount", pageCount));
		param.add(new BasicNameValuePair("totalCount", totalCount));
		String ru = hbs.postUrlResult("driver!confirmOrders.action", param);	
		return ru;
	}
	
	//driver!accept.action
	/**
	* @author 张怡菲
	* @createTime 	2013-5-7 下午4:25:44
	* @Title: driverAcceptOrders
	* @Description: 司机接订单操作
	* @param weixinId
	* @param orderSubId
	* @return    String
	* @modifyTime	2013-5-7 下午4:25:44
	* @modifyNote (在这里说明修改了什么)
	* 
	*/
	
	public String driverAcceptOrders(String weixinId,String orderSubId){
		ArrayList<NameValuePair> param = new ArrayList<NameValuePair>();
		param.add(new BasicNameValuePair("weixinId", weixinId));
		param.add(new BasicNameValuePair("orderSubId", orderSubId));
		String ru = hbs.postUrlResult("driver!accept.action", param);	
		return ru;
	}
	//driver!confirm.action
	/**
	* @author 张怡菲
	* @createTime 	2013-5-7 下午4:38:53
	* @Title: driverConfirmOrders
	* @Description: 确认订单
	* @param weixinId
	* @param orderSubId
	* @return    String
	* @modifyTime	2013-5-7 下午4:38:53
	* 
	*/
	
	public String driverConfirmOrders(String weixinId,String orderSubId){
		ArrayList<NameValuePair> param = new ArrayList<NameValuePair>();
		param.add(new BasicNameValuePair("weixinId", weixinId));
		param.add(new BasicNameValuePair("orderSubId", orderSubId));
		String ru = hbs.postUrlResult("driver!confirm.action", param);	
		return ru;
	}

}
